import java.awt.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        String str = in.next();
        String[] split = split(str);
        String ret = add(split);
    }

    private static String add(String[] split) {
        StringBuilder sb = new StringBuilder();
        for (String s : split) {
            sb.append(s);
            sb.append("&&");
        }
        return sb.toString();
    }

    private static String[] split(String str) {
        char[] s = str.toCharArray();
        int cur = 0;
        int left = 0;
        List<String> list = new ArrayList<>();
        while (cur < s.length) {
            if (s[cur] == '&' && s[cur + 1] == '&') {
                list.add(new String(str.substring(left,cur)));
                left = cur + 2;
                cur += 2;
            }else {
                cur++;
            }
        }
        list.add(new String(str.substring(left,cur)));
        int cnt = 0;
        String[] ans = new String[list.size()];
        for (String st : list) {
            ans[cnt++] = st;
        }
        return ans;
    }
}
